#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>
#include <string.h>
#include <stdbool.h>
#include <tgmath.h>

//https://www.nowcoder.com/practice/1221ec77125d4370833fd3ad5ba72395?tpId=37&&tqId=21260&rp=1&ru=/ta/huawei&qru=/ta/huawei/question-ranking

int Fib(int n) {
    int num1 = 1;
    int num2 = 1;
    int sum = 1;
    while (2 < n) {
        sum = num2 + num1;
        num1 = num2;
        num2 = sum;
        n--;
    }
    return sum;
}

int main() {
    int input = 0;
    while (scanf("%d", &input) != EOF) {
        printf("%d ", Fib(input));
    }
    return 0;
}
